var version = function () {
    var fromId ="#hostAddOrEditModelForm";
    var params={};
    var url = path + '/action/powerdb/designer/VersionAction/ ';
    return {
        addVersion: function () {
            var index;
            index = layer.open({
                type: 1,
                title: '新增版本',
                shadeClose: true,
                //shade: 0.8,
                area: ['600px', '280px'],
                content: $("#hostModal"),
                zIndex: 1000,
                btn: ['新增', '取消'],
                yes: function (index, layero) {
                    version.saveVersion();
                    layer.close(index);
                }
            });
        },
        saveVersion:function(){
            params=sUtils.getFormParams(fromId);
            slog.log(params);
            sPost.ajax(url,params,function(data){
                if(data.success){
                    alert('新增成功');
                }else{
                    alert('新增失败');
                }
            });

        }
    }
}();